/*
 * XML Type:  TaxW2RequestMessageSetV1
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.TaxW2RequestMessageSetV1
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML TaxW2RequestMessageSetV1(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class TaxW2RequestMessageSetV1Impl extends net.ofx.types.x2003.x04.impl.AbstractRequestMessageSetImpl implements net.ofx.types.x2003.x04.TaxW2RequestMessageSetV1
{
    
    public TaxW2RequestMessageSetV1Impl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TAXW2TRNRQ$0 = 
        new javax.xml.namespace.QName("", "TAXW2TRNRQ");
    
    
    /**
     * Gets array of all "TAXW2TRNRQ" elements
     */
    public net.ofx.types.x2003.x04.TaxW2TransactionRequest[] getTAXW2TRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TAXW2TRNRQ$0, targetList);
            net.ofx.types.x2003.x04.TaxW2TransactionRequest[] result = new net.ofx.types.x2003.x04.TaxW2TransactionRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "TAXW2TRNRQ" element
     */
    public net.ofx.types.x2003.x04.TaxW2TransactionRequest getTAXW2TRNRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2TransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.TaxW2TransactionRequest)get_store().find_element_user(TAXW2TRNRQ$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "TAXW2TRNRQ" element
     */
    public int sizeOfTAXW2TRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TAXW2TRNRQ$0);
        }
    }
    
    /**
     * Sets array of all "TAXW2TRNRQ" element
     */
    public void setTAXW2TRNRQArray(net.ofx.types.x2003.x04.TaxW2TransactionRequest[] taxw2TRNRQArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(taxw2TRNRQArray, TAXW2TRNRQ$0);
        }
    }
    
    /**
     * Sets ith "TAXW2TRNRQ" element
     */
    public void setTAXW2TRNRQArray(int i, net.ofx.types.x2003.x04.TaxW2TransactionRequest taxw2TRNRQ)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2TransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.TaxW2TransactionRequest)get_store().find_element_user(TAXW2TRNRQ$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(taxw2TRNRQ);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "TAXW2TRNRQ" element
     */
    public net.ofx.types.x2003.x04.TaxW2TransactionRequest insertNewTAXW2TRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2TransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.TaxW2TransactionRequest)get_store().insert_element_user(TAXW2TRNRQ$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "TAXW2TRNRQ" element
     */
    public net.ofx.types.x2003.x04.TaxW2TransactionRequest addNewTAXW2TRNRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2TransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.TaxW2TransactionRequest)get_store().add_element_user(TAXW2TRNRQ$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "TAXW2TRNRQ" element
     */
    public void removeTAXW2TRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TAXW2TRNRQ$0, i);
        }
    }
}
